package hello;

import java.math.*;
import java.util.*;

public class MonetaryAmount
{
	private final BigDecimal amount;
	private final Currency currency;
	
	public MonetaryAmount(BigDecimal amount,Currency currency){
		this.amount=amount;
		this.currency=currency;
	}
	
	public BigDecimal getAmount(){
		return amount;
	}
	
	public Currency getCurrency(){
		return currency;
	}
	
	public String toString(){
		return currency.getSymbol()+amount;
	}
}